<div id="bottomborder">
		<div class="maincontent">
			<div class="section group">
				<div class="col span_2_of_3 footer">
					<ul class="footernav">
						<li><a href="<?php echo base_url();?>mfcpages/home">Home</a></li>|
						<li><a href="<?php echo base_url();?>mfcpages/about_us">About Us</a></li>|
						<li><a href="<?php echo base_url();?>mfcpages/contact_us">Contact Us</a></li>
					</ul>
				</div>
				<div class="col span_1_of_3 copy">&copy; All Rights Reserved mfctravel.info 2013</div>
			</div>
		</div>
	</div>
</div>
<script>

(function($,W,D)
{
    var JQUERY4U = {};

    JQUERY4U.UTIL =
    {
        setupFormValidation: function()
        {
            //form validation rules
            $("#register-form").validate({
                rules: {
                    name: "required",
                    message: "required",
                   
                    email: {
                        required: true,
                        email: true,

                    },

                    mobile: {
                    	required : true,
                    	number: true
                    }
                   
                
                },
                messages: {
                    name: "Please enter your name",
                    message: "Please enter your message",
                    email: "Please enter a valid email address",
                    mobile: "Please provide a mobile number"
                   
                },
                submitHandler: function(form) {
                	
		           $.ajax({
			          type: 'POST',
			          url: 'actions/inquiry.php',
			          data: $(form).serialize(),
			          beforeSend: function(){
			          		sending('Sending Message...')
			          },
			          success: function(success){
			            if(success == "Success!"){
			            	sendingSuccess('Your message has been delivered we will get back to you in a bit.');
			            	returnHome()
			             
			            } else {
			            	sendingFailed('Something went wrong please try again...');
			            	returnHere()
			            }
			       	  }
			        });
                }
            });
        }
    }

    //when the dom has loaded setup form validation rules
    $(D).ready(function($) {
        JQUERY4U.UTIL.setupFormValidation();
    });

})(jQuery, window, document);

$( '<div>', {
	'class': 'overlay'
}).insertAfter('#maincontentcontainer');

$( '<div>', {
	'class': 'notification'
}).insertBefore('#wrapper');
          
 var winH = $(window).height();
 var winW = $(window).width();
 var notificationW = $('.notification').width();
var WinWnotifW = winW/2 - notificationW/2

 $('.notification').css({
 	top: winH/2,
 	left: WinWnotifW
 })


function sending(msg) {
	$('.overlay').fadeIn();
	$('.notification').html(msg).fadeIn();	
}

function sendingSuccess(msg) {
	$('.overlay').fadeIn();
	$('.notification').html(msg).fadeIn();	
}

function sendingFailed(msg) {
	$('.overlay').fadeIn();
	$('.notification').html(msg).fadeIn();	
}
      
function returnHome(){
  setTimeout('window.location.href="http://mfctravel.info/"',2000);
}

function returnHere(){
  setTimeout('window.location.href="http://mfctravel.info/contact.php"',2000);
}



	</script>
</body>
</html>